tot(input) where
    tot(X) = S
      where
        S = 0 fby S + X;
      end;
  end
